<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="js/1.4.8/angular.js"></script>
</head>
<body>
<div ng-controller="myCtrl">
   <div>当前URL：{{cur}}</div>
   <div>上页URL：{{prev}}</div>
</div>
<script type="text/javascript">
    var app = angular.module("app", [])
            .controller("myCtrl",["$rootScope","$scope","$location",function ($rootScope,$scope,$location) {
                // $rootScope.$on：绑定$locationChangeStart事件
                $rootScope.$on('$locationChangeStart',function (evt,current,previous) {
                    console.log("事件已触发！");
                    $scope.cur = current;
                    $scope.prev = previous;
                });
            }]);
</script>
</body>
</html>